class CGameWorld;
class CGameWorldEvent;
class CGamePlayer;

namespace AVUI
{
    class UIElement;
    class TextBlock;
}

enum EShipType;

class CGameHud
{
public:
    CGameHud(CGameWorld* pGameWorld, AVUI::FrameworkElement* pRoot);
    ~CGameHud();

    void FrameUpdate();
private:
    void UpdateSpeed();
    void UpdateFuel();
    void UpdateShield();
    void UpdateDamage();
    void UpdateArmies();
    void UpdateKills();
    void UpdateFlags();
    void UpdateEngineTemp();
    void UpdateWeaponTemp();
    void OnGameWorldEvent(CGameWorldEvent* pEvent);
    void UpdateWindowTextValue(const char* szWindowName, const char* szFmt, ...);
    void UpdateProgressBarValue(const char* szWindowName, float flProgress);
    void UpdateTime(DWORD dwTimeIncrement);

    void OnRefit(AVUI::Object*, AVUI::RoutedEventArgs*);
    void OnRefit(EShipType eShipType);

    AVUI::FrameworkElement* m_pRoot;
    AVUI::FrameworkElement* m_pOrbitPanel;
    AVUI::FrameworkElement* m_pRefitPanel;
    CGameWorld* m_pGameWorld;
    CGameWorld::CEventSubscription* m_pEventSubscription;


    DWORD m_dwCachedSpeed;
    DWORD m_dwCachedArmies;
    DWORD m_dwCachedEngineTemp;
    DWORD m_dwCachedWeaponTemp;
    float m_flCachedKills;
    DWORD m_dwCachedFuel;
    DWORD m_dwCachedShield;
    DWORD m_dwCachedDamage;

    DWORD m_dwTime;

    DWORD m_dwCachedFlags;
};  

